import 'package:flutter/material.dart';
import 'package:lai_zhan/common/style/AppStyle.dart';
import 'package:lai_zhan/widget/ImageButton.dart';
class BaseScaffold extends StatelessWidget {
  final String title;
  final VoidCallback back;
  final List<Widget> actions;
  final Widget body;
  final Color backgroundColor;
  final Color titleColor;
  final Color iconColor;
  final Widget bottomSheet;
  final double elevation;

  BaseScaffold(
      {this.title,
      this.back,
      this.actions,
      this.body,
      this.backgroundColor,
      this.titleColor,
      this.iconColor = Colors.white,
      this.bottomSheet,
      this.elevation = 1});

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return new Scaffold(
      appBar: new AppBar(
        title: title!=null?new Text(title,style: TextStyle(color: titleColor),):new Container(),
        centerTitle: true,
        leading: back != null?new IconButton(icon: Icon(Icons.arrow_back,size: 30,color: iconColor,), onPressed: back):null,
        actions: actions,
        backgroundColor: backgroundColor,
        elevation: elevation,
      ),
      body: body,
      backgroundColor: Color(AppColors.lightWhite),
      bottomSheet: bottomSheet !=null?bottomSheet:null,
    );
  }

}
